/*
 *  SymbolTableAttributeS.h
 *  Compiler
 *
 *  Created by Jacopo De Stefani on 3/4/12.
 *  Copyright 2012 Politecnico di Milano. All rights reserved.
 *
 */

#ifndef SYMBOLTABLEATTRIBUTES_H
#define SYMBOLTABLEATTRIBUTES_H

#include "enums.h"

using namespace std;


class SymbolTableAttributes
{
public: //Constructor
	SymbolTableAttributes():address(-1),typeP(),scopeP(),routineFlag(false),scopeId(){};
	
	//Get and Set Methods to access attributes
	int	getAddress(){return address;}
	TypesP	getTypeP(){return typeP;};
	ScopesP	getScopeP(){return scopeP;};
	bool	getRoutineFlag(){return routineFlag;};
        string  getScopeId(){return scopeId;};
	
	void	setAddress(int addr){address = addr;}
	void	setTypeP(TypesP t){typeP = t;};
	void	setScopeP(ScopesP s){scopeP = s;};
	void	setRoutineFlag(bool ff){routineFlag = ff;};
	void    setScopeId(const string &sId){scopeId = sId;};
	
private:
	//Address of the entry
	int address;
	//Type of the entry
	TypesP typeP;
	//Scope of the entry
	ScopesP scopeP;
	//Flag to check whether the variable is the return value of a function or not.
	bool routineFlag;
        //String defining the scope of the entry
        string scopeId;
	
};
#endif
